// Copyright (C) 2011  Andrew H. Chan
// 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

#ifndef _UTIL_H__
#define _UTIL_H__
#include "typedefs.h"

template<typename T>
std::ostream& operator<<(std::ostream& os, std::vector<T> const& vec) {
    for(uint i=0; i < vec.size()-1; ++i) {
        std::cout << vec[i];
    }
    std::cout << vec[vec.size()-1];
    return os;
}

template<typename T, typename S>
std::ostream& operator<<(std::ostream& os, std::pair<T, S> const& pr) {
    std::cout << '(' << pr.first << ", " << pr.second << ')';
    return os;
}

#endif
